import {defineStore} from "pinia";
import axios from '../../utils/http'

const useQuestionTypeStore = defineStore('types', {
    state: () => {
        return {
            typeList: []
        }
    },
    // getters: {
    //     getList: (state) => {
    //         return state.typeList
    //     },
    // },
    actions: {
        async getTypeList() {
            let res = await axios.get('/api/dict/dict/questioncategory', {})
            this.typeList = res.data.data
        }
    }
})
export default useQuestionTypeStore